Optimal. Leaf size=94 \[ \frac{2 a^2 (3 B+2 C) \sin (c+d x)}{3 d}+\frac{a^2 (3 B+2 C) \sin (c+d x) \cos (c+d x)}{6 d}+\frac{1}{2} a^2 x (3 B+2 C)+\frac{C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.124678, antiderivative size = 94, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.079, Rules used = {3029, 2751, 2644} \[ \frac{2 a^2 (3 B+2 C) \sin (c+d x)}{3 d}+\frac{a^2 (3 B+2 C) \sin (c+d x) \cos (c+d x)}{6 d}+\frac{1}{2} a^2 x (3 B+2 C)+\frac{C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3029
Rule 2751
Rule 2644
Rubi steps
\begin{align*} \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\int (a+a \cos (c+d x))^2 (B+C \cos (c+d x)) \, dx\\ &=\frac{C (a+a \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac{1}{3} (3 B+2 C) \int (a+a \cos (c+d x))^2 \, dx\\ &=\frac{1}{2} a^2 (3 B+2 C) x+\frac{2 a^2 (3 B+2 C) \sin (c+d x)}{3 d}+\frac{a^2 (3 B+2 C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac{C (a+a \cos (c+d x))^2 \sin (c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.189075, size = 61, normalized size = 0.65 \[ \frac{a^2 (3 (8 B+7 C) \sin (c+d x)+3 (B+2 C) \sin (2 (c+d x))+18 B d x+C \sin (3 (c+d x))+12 C d x)}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.049, size = 116, normalized size = 1.2 \begin{align*}{\frac{1}{d} \left ({\frac{{a}^{2}C \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}}+{a}^{2}B \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +2\,{a}^{2}C \left ( 1/2\,\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) +1/2\,dx+c/2 \right ) +2\,{a}^{2}B\sin \left ( dx+c \right ) +{a}^{2}C\sin \left ( dx+c \right ) +{a}^{2}B \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05685, size = 149, normalized size = 1.59 \begin{align*} \frac{3 \,{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} + 12 \,{\left (d x + c\right )} B a^{2} - 4 \,{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} + 6 \,{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} + 24 \, B a^{2} \sin \left (d x + c\right ) + 12 \, C a^{2} \sin \left (d x + c\right )}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.64236, size = 165, normalized size = 1.76 \begin{align*} \frac{3 \,{\left (3 \, B + 2 \, C\right )} a^{2} d x +{\left (2 \, C a^{2} \cos \left (d x + c\right )^{2} + 3 \,{\left (B + 2 \, C\right )} a^{2} \cos \left (d x + c\right ) + 2 \,{\left (6 \, B + 5 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.76221, size = 192, normalized size = 2.04 \begin{align*} \frac{3 \,{\left (3 \, B a^{2} + 2 \, C a^{2}\right )}{\left (d x + c\right )} + \frac{2 \,{\left (9 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 6 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 24 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 16 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 15 \, B a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 18 \, C a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]